<%@ taglib prefix="jstl" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
    Document   : index
    Created on : Jun 1, 2016, 2:06:23 PM
    Author     : niugao
--%>
<%@page contentType="text/html" pageEncoding="UTF-8" %>

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>用户注册
    </title>
    <link rel="stylesheet" type="text/css" href="/css/main.css">
    <link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css">
    <script src="/js/jquery-1.12.4.min.js"></script>
    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="/js/bootstrap.min.js"></script>
    <style>
        .container input {
            width: 100%;
        }

        .container div {
            margin: 5px 0px;
        }
    </style>

    <script>
        $(document).ready(function(){
            $("#back").click(function(){
                window.history.back(-1);
            });
        });
    </script>
    <script>
        function refreshCaptchaImg() {
            //从服务端重新下载验证码图片
            //给这个地正加参数纯为了强制刷新，否则由于src指向的url地址没变，
            //不会直正生刷新图片
            var now = new Date()
            $("#captcha").attr("src","/login/captcha_img?"+now.getTime());
        }
    </script>
</head>
<body style="background: url('../img/background.jpg')">
<!-- 很多页面都使用这个顶部栏，所以拿出来放到一个单独文件中 -->
<!-- 很多页面都使用这个顶部栏，所以拿出来放到一个单独文件中 -->
<div style="text-align: center;">
    <div class="container" style="width: 400px;margin: 10px auto;text-align: left; ">
        <form method="POST" action="/Manager/copyupdateUser">
            <div class="row">
                <div class="row">
                    <div class="ol-lg-3 col-md-3 col-sm-3 col-xs-3"></div>
                    <div class="ol-lg-6 col-md-6 col-sm-6 col-xs-6" style="text-align: center">
                        <strong style="color: #c9e2b3;">超贝订餐系统</strong>
                    </div>
                    <div class="ol-lg-3 col-md-3 col-sm-3 col-xs-3"></div>
                </div>
                <div class="row">
                    <div class="ol-lg-3 col-md-3 col-sm-3 col-xs-3"></div>
                    <div class="ol-lg-6 col-md-6 col-sm-6 col-xs-6" style="text-align: center">
                        <em style="color: #c9e2b3;">修改用户信息</em>
                    </div>
                    <div class="ol-lg-3 col-md-3 col-sm-3 col-xs-3"></div>
                </div>
                <div class="col-md-12">
                    <input type="text" name="name" placeholder="账号" value="${user.name}"/>
                </div>
            </div>
            <div class="row">
                <div class="col-md-12">
                     <input type="text" name="realname" placeholder="用户名" value="${user.realname}" />
                </div>
            </div>
            <div class="row">
                <div class="col-md-12"><input type="password" name="password" placeholder="密码" value="${user.password}"/>
                </div>
            </div>
            <div class="row">
                <div class="col-md-12">
                    <input type="text" name="passwordtwo" placeholder="确认密码" value="${user.password}"/>
                </div>
            </div>
            <div class="row">
                <div class="col-md-12">

                </div>
            </div>

            <div class="row">
                <div class="col-md-12">
                  <input type="text" name="phone" placeholder="电话" value="${user.phone}"/>
                </div>
            </div>
            <div class="row">
                <div class="col-md-3" style="text-align: right">
                    <%--性别： <input type="text" name="sex"/>--%>
                        <p style="color:mintcream;"> 男</p>
                </div>
                <div class="col-md-3" style="text-align: left">
                    <input type="radio" name="sex" value="man" checked />
                </div>
                <div class="col-md-3" style="text-align: right">
                    <p style="color:mintcream;">女</p>
                </div>
                <div class="col-md-3" style="text-align: left">
                    <input type="radio" name="sex" value="femail">
                </div>
            </div>
            <div class="row">
                <div class="col-md-12">
                    <input type="text" name="address" placeholder="地址" value="${user.address}"/>
                </div>
            </div>
            <div class="row">
                <div class="col-md-6" >
                    <img id="captcha" src="/login/captcha_img" onclick="refreshCaptchaImg()">
                </div>
                <div class="col-md-6" >
                    <input type="text" placeholder="验证码" name="random" />
                </div>
            </div>
            <div class="row" style="border-top:solid 1px;">
                <div class="col-sm-12">
                    <input type="submit" name="role" value="确定"/>
                </div>
            </div>
        </form>
        <div class="col-sm-12">
            <input type="submit" id="back" name="role" value="返回"/>
        </div>

        <div class="row" style="color: red">
            ${errMsg}
        </div>
    </div>
</div>
</body>
</html>
